home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / c-runtime / dispatch / RCS / Object.h,v < prev    next >
Encoding:
Text File  |  1992-08-18  |  10.3 KB  |  510 lines

  1. head    0.13;
  2. access;
  3. symbols;
  4. locks; strict;
  5. comment    @ * @;
  6.  
  7.  
  8. 0.13
  9. date    92.08.18.04.46.58;    author dglattin;    state Exp;
  10. branches;
  11. next    0.12;
  12.  
  13. 0.12
  14. date    92.04.13.11.43.08;    author dennisg;    state Exp;
  15. branches;
  16. next    0.11;
  17.  
  18. 0.11
  19. date    92.01.03.02.55.03;    author dennisg;    state Exp;
  20. branches;
  21. next    0.10;
  22.  
  23. 0.10
  24. date    91.12.31.20.13.03;    author dennisg;    state Exp;
  25. branches;
  26. next    0.9;
  27.  
  28. 0.9
  29. date    91.12.07.00.49.28;    author dennisg;    state Exp;
  30. branches;
  31. next    0.8;
  32.  
  33. 0.8
  34. date    91.12.06.00.35.05;    author dennisg;    state Exp;
  35. branches;
  36. next    0.7;
  37.  
  38. 0.7
  39. date    91.11.30.14.19.18;    author dennisg;    state Exp;
  40. branches;
  41. next    0.6;
  42.  
  43. 0.6
  44. date    91.11.29.20.01.29;    author dennisg;    state Exp;
  45. branches;
  46. next    0.5;
  47.  
  48. 0.5
  49. date    91.11.20.02.06.30;    author dennisg;    state Exp;
  50. branches;
  51. next    0.4;
  52.  
  53. 0.4
  54. date    91.11.19.12.37.24;    author dennisg;    state Exp;
  55. branches;
  56. next    0.3;
  57.  
  58. 0.3
  59. date    91.11.16.13.32.58;    author dennisg;    state Exp;
  60. branches;
  61. next    0.2;
  62.  
  63. 0.2
  64. date    91.11.07.22.30.54;    author dennisg;    state Exp;
  65. branches;
  66. next    0.1;
  67.  
  68. 0.1
  69. date    91.10.24.00.45.39;    author dennisg;    state Exp;
  70. branches;
  71. next    ;
  72.  
  73.  
  74. desc
  75. @This is the definition file for class Object.
  76. Object is the root of all classes under Objective-C.
  77. @
  78.  
  79.  
  80. 0.13
  81. log
  82. @Saving a working version before release.
  83. @
  84. text
  85. @/* -*-c-*- */
  86.  
  87. /* Copyright (C) 1989, 1992 Free Software Foundation, Inc.
  88.  
  89. This file is part of GNU CC.
  90.  
  91. GNU CC is free software; you can redistribute it and/or modify
  92. it under the terms of the GNU General Public License as published by
  93. the Free Software Foundation; either version 2, or (at your option)
  94. any later version.
  95.  
  96. GNU CC is distributed in the hope that it will be useful,
  97. but WITHOUT ANY WARRANTY; without even the implied warranty of
  98. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  99. GNU General Public License for more details.
  100.  
  101. You should have received a copy of the GNU General Public License
  102. along with GNU CC; see the file COPYING.  If not, write to
  103. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  104.  
  105. /* As a special exception, if you link this library with files
  106.    compiled with GCC to produce an executable, this does not cause
  107.    the resulting executable to be covered by the GNU General Public License.
  108.    This exception does not however invalidate any other reasons why
  109.    the executable file might be covered by the GNU General Public License.  */
  110.  
  111. /* 
  112.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/dispatch.common/RCS/Object.h,v 0.12 1992/04/13 11:43:08 dennisg Exp dennisg $
  113.   $Author: dennisg $
  114.   $Date: 1992/04/13 11:43:08 $
  115.   $Log: Object.h,v $
  116.  * Revision 0.12  1992/04/13  11:43:08  dennisg
  117.  * Check in after array version of run-time works.
  118.  * Expect more changes as hash version and other changes are made.
  119.  *
  120.  * Revision 0.11  1992/01/03  02:55:03  dennisg
  121.  * modified to handle new initialization scheme.
  122.  * fixed code structure.
  123.  *
  124.  * Revision 0.10  1991/12/31  20:13:03  dennisg
  125.  * Deleted index variable stuff.  Index variables are a hack to the language.
  126.  *
  127.  * Revision 0.9  1991/12/07  00:49:28  dennisg
  128.  * deleted +description:.
  129.  *
  130.  * Revision 0.8  1991/12/06  00:35:05  dennisg
  131.  * deleted perform:with:: method.
  132.  *
  133.  * Revision 0.7  1991/11/30  14:19:18  dennisg
  134.  * implemented archiving.
  135.  *
  136.  * Revision 0.6  1991/11/29  20:01:29  dennisg
  137.  * fixed several const decls.  bozo.
  138.  *
  139.  * Revision 0.5  1991/11/20  02:06:30  dennisg
  140.  * returned doesNotRecognize:
  141.  *
  142.  * Revision 0.4  1991/11/19  12:37:24  dennisg
  143.  * minr changes.  still in a state of flux.
  144.  *
  145.  * Revision 0.3  1991/11/16  13:32:58  dennisg
  146.  * changed #import statements to #include.
  147.  * this should make gcc2 happy -- geez.
  148.  *
  149.  * Revision 0.2  1991/11/07  22:30:54  dennisg
  150.  * added copyleft
  151.  *
  152.  * Revision 0.1  1991/10/24  00:45:39  dennisg
  153.  * Initial check in.  Preliminary development stage.
  154.  *
  155. */
  156.  
  157.  
  158. #ifndef _object_INCLUDE_GNU
  159. #define _object_INCLUDE_GNU
  160.  
  161. #include  <objc.h>
  162. #include  <stdio.h>
  163. #include  <sys/types.h>
  164.  
  165. #ifdef  __NeXT__
  166. /* Need prototypes for read() and write(). 
  167.   Most machines put these in stdio.h! */
  168. #include  <libc.h>
  169. #endif
  170.  
  171.  
  172.  
  173. /*
  174.  * All classes are derived from Object.  As such this is the 
  175.  *  overhead tacked onto those objects.  
  176.  */
  177. @@interface Object {
  178.   Class_t isa;                                  /* A pointer to the instance's 
  179.                                                   class structure. 
  180.                                                   
  181.                                                   This structure is the one
  182.                                                   generated by the compiler
  183.                                                   and located in the TEXT 
  184.                                                   segment.  The run-time uses
  185.                                                   its address as a key to 
  186.                                                   run-time information. */
  187. }
  188.  
  189. /* Creating, copying, and freeing instances */
  190.  
  191. + new;
  192. + free;
  193. - free;
  194. - copy;
  195. - shallowCopy;
  196. - deepCopy;
  197.  
  198. /* Identifying classes */
  199.  
  200. + ( Class_t )class;
  201. + ( Class_t )superClass;
  202. - ( Class_t )class;
  203. - ( Class_t )superClass;
  204. - ( const char* )name;
  205.  
  206. /* Identifying and comparing instances */
  207.  
  208. - self;
  209. - ( u_int )hash;
  210. - ( BOOL )isEqual:anObject;
  211.  
  212. /* Testing inheritance relationships */
  213.  
  214. - ( BOOL )isKindOf:( Class_t )aClassObject;
  215. - ( BOOL )isMemberOf:( Class_t )aClassObject;
  216. - ( BOOL )isKindOfGivenName:( const char* )aClassName;
  217. - ( BOOL )isMemberOfGivenName:( const char* )aClassName;
  218.  
  219. /* Testing class functionality */
  220.  
  221. + ( BOOL )instancesRespondTo:( SEL )aSel;
  222. - ( BOOL )respondsTo:( SEL )aSel;
  223.  
  224. /* Sending messages determined at run time */
  225.  
  226. - perform:( SEL )aSel;
  227. - perform:( SEL )aSel with:aObject;
  228.  
  229. /* Posing */
  230.  
  231. + poseAs:( Class_t )aClassObject;
  232.  
  233. /* Enforcing intentions */
  234.  
  235. - subclassResponsibility:( SEL )aSel;
  236. - notImplemented:( SEL )aSel;
  237.  
  238. /* Error handling */
  239.  
  240. - doesNotRecognize:(SEL)aSelector;
  241. - error:( const char* )aString, ...;
  242. + error:( const char* )aString, ...;
  243.  
  244. /* Archiving */
  245.  
  246. - storeOn:( int )aFd;
  247. + readFrom:( int )aFd;
  248. - readFrom:( int )aFd;
  249. + ( int )version;
  250. + setVersion:( int )aVersion;
  251.  
  252. @@end
  253.  
  254.  
  255. #endif
  256.  
  257. @
  258.  
  259.  
  260. 0.12
  261. log
  262. @Check in after array version of run-time works.
  263. Expect more changes as hash version and other changes are made.
  264. @
  265. text
  266. @d1 28
  267. a28 22
  268. /* -*-c-*-
  269.  * This file contains declarations for the class Object.
  270.  *
  271.  * Object is the root of all the Objective-C classes.  As such it
  272.  *  provides services for its subclasses.
  273.  *
  274.  * Copyright (C) 1991 Threaded Technologies Inc.
  275.  * 
  276.  * This program is free software; you can redistribute it and/or modify
  277.  * it under the terms of the GNU General Public License as published
  278.  * by the Free Software Foundation; either version 1, or any later version.
  279.  * 
  280.  * This program is distributed in the hope that it will be useful,
  281.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  282.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  283.  * General Public License for more details.
  284.  * 
  285.  * You should receive a copy of the GNU General Public License 
  286.  * along with this program; if not, write to the Free Software
  287.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  288.  * 
  289.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/lib/RCS/Object.h,v 0.11 1992/01/03 02:55:03 dennisg Exp dennisg $
  290. d30 1
  291. a30 1
  292.   $Date: 1992/01/03 02:55:03 $
  293. d32 4
  294. @
  295.  
  296.  
  297. 0.11
  298. log
  299. @modified to handle new initialization scheme.
  300. fixed code structure.
  301. @
  302. text
  303. @d22 1
  304. a22 1
  305.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/lib/RCS/Object.h,v 0.10 1991/12/31 20:13:03 dennisg Exp dennisg $
  306. d24 1
  307. a24 1
  308.   $Date: 1991/12/31 20:13:03 $
  309. d26 4
  310. d67 1
  311. a67 1
  312. #include  <ObjC.h>
  313. @
  314.  
  315.  
  316. 0.10
  317. log
  318. @Deleted index variable stuff.  Index variables are a hack to the language.
  319. @
  320. text
  321. @d22 1
  322. a22 1
  323.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/lib/RCS/Object.h,v 0.9 1991/12/07 00:49:28 dennisg Exp dennisg $
  324. d24 1
  325. a24 1
  326.   $Date: 1991/12/07 00:49:28 $
  327. d26 3
  328. d63 10
  329. a72 2
  330. #include <ObjC.h>
  331. #include <sys/types.h>
  332. @
  333.  
  334.  
  335. 0.9
  336. log
  337. @deleted +description:.
  338. @
  339. text
  340. @d22 1
  341. a22 1
  342.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/lib/RCS/Object.h,v 0.8 1991/12/06 00:35:05 dennisg Exp dennisg $
  343. d24 1
  344. a24 1
  345.   $Date: 1991/12/06 00:35:05 $
  346. d26 3
  347. a141 4
  348.  
  349. /* Indexed instance variable types */
  350. - ( u_int )capacity;
  351. + ( int )ndxVarSize;
  352. @
  353.  
  354.  
  355. 0.8
  356. log
  357. @deleted perform:with:: method.
  358. @
  359. text
  360. @d22 1
  361. a22 1
  362.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/lib/RCS/Object.h,v 0.7 1991/11/30 14:19:18 dennisg Exp dennisg $
  363. d24 1
  364. a24 1
  365.   $Date: 1991/11/30 14:19:18 $
  366. d26 3
  367. a142 1
  368. + ( STR )describe;
  369. @
  370.  
  371.  
  372. 0.7
  373. log
  374. @implemented archiving.
  375. @
  376. text
  377. @d22 1
  378. a22 1
  379.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/lib/RCS/Object.h,v 0.6 1991/11/29 20:01:29 dennisg Exp dennisg $
  380. d24 1
  381. a24 1
  382.   $Date: 1991/11/29 20:01:29 $
  383. d26 3
  384. d112 1
  385. a112 2
  386. - perform:( SEL )aSel with:anObject;
  387. - perform:( SEL )aSel with:object1 with:object2;
  388. @
  389.  
  390.  
  391. 0.6
  392. log
  393. @fixed several const decls.  bozo.
  394. @
  395. text
  396. @d22 1
  397. a22 1
  398.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/lib/RCS/Object.h,v 0.5 1991/11/20 02:06:30 dennisg Exp dennisg $
  399. d24 1
  400. a24 1
  401.   $Date: 1991/11/20 02:06:30 $
  402. d26 3
  403. d129 3
  404. a131 3
  405. - awake;
  406. - write:( int)aFd;
  407. - read:( int )aFd;
  408. d134 5
  409. @
  410.  
  411.  
  412. 0.5
  413. log
  414. @returned doesNotRecognize:
  415. @
  416. text
  417. @d22 1
  418. a22 1
  419.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/lib/RCS/Object.h,v 0.4 1991/11/19 12:37:24 dennisg Exp dennisg $
  420. d24 1
  421. a24 1
  422.   $Date: 1991/11/19 12:37:24 $
  423. d26 3
  424. d83 1
  425. a83 1
  426. - ( const char * )name;
  427. d95 2
  428. a96 2
  429. - ( BOOL )isKindOfGivenName:( STR )aClassName;
  430. - ( BOOL )isMemberOfGivenName:( STR )aClassName;
  431. d121 2
  432. a122 2
  433. - error:( STR )aString, ...;
  434. + error:( STR )aString, ...;
  435. @
  436.  
  437.  
  438. 0.4
  439. log
  440. @minr changes.  still in a state of flux.
  441. @
  442. text
  443. @d22 1
  444. a22 1
  445.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/lib/RCS/Object.h,v 0.3 1991/11/16 13:32:58 dennisg Exp dennisg $
  446. d24 1
  447. a24 1
  448.   $Date: 1991/11/16 13:32:58 $
  449. d26 3
  450. d117 1
  451. @
  452.  
  453.  
  454. 0.3
  455. log
  456. @changed #import statements to #include.
  457. this should make gcc2 happy -- geez.
  458. @
  459. text
  460. @d22 1
  461. a22 1
  462.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/lib/RCS/Object.h,v 0.2 1991/11/07 22:30:54 dennisg Exp dennisg $
  463. d24 1
  464. a24 1
  465.   $Date: 1991/11/07 22:30:54 $
  466. d26 4
  467. d68 2
  468. a96 5
  469. /* Obtaining method handles */
  470.  
  471. - ( IMP )methodFor:( SEL )aSel;
  472. + ( IMP )instanceMethodFor:( SEL )aSel;
  473.  
  474. a113 1
  475. - doesNotRecognize:( SEL )aSel;
  476. @
  477.  
  478.  
  479. 0.2
  480. log
  481. @added copyleft
  482. @
  483. text
  484. @d22 1
  485. a22 1
  486.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/lib/RCS/Object.h,v 0.1 1991/10/24 00:45:39 dennisg Exp dennisg $
  487. d24 1
  488. a24 1
  489.   $Date: 1991/10/24 00:45:39 $
  490. d26 3
  491. d38 2
  492. a39 2
  493. #import <ObjC.h>
  494. #import <sys/types.h>
  495. @
  496.  
  497.  
  498. 0.1
  499. log
  500. @Initial check in.  Preliminary development stage.
  501. @
  502. text
  503. @d7 22
  504. a28 4
  505.   $Header$
  506.   $Author$
  507.   $Date$
  508.   $Log$
  509. @
  510.